<?php

namespace App\Http\Controllers\user;

use App\Dao\LineUpPriceDao;
use App\Dao\OrdersDao;
use App\Dao\RechargeDao;
use App\Services\Logger;
use App\Services\PayServices;
use Faker\Provider\Base;

class NoticeController extends BaseController
{
    public function notice_recharge()
    {
        $result = PayServices::get_app()->handlePaidNotify(function ($message,$fail){
            //回调

            RechargeDao::recOrder($message['out_trade_no']);

            Logger::opay('=>>>>>>>>>',[
                'message'=>$message
            ]);
        });

    }

    public function notice_pay_goods()
    {
        $result = PayServices::get_app()->handlePaidNotify(function ($message,$fail){
            //回调

            OrdersDao::noticePayLine($message['out_trade_no']);

            Logger::opay('=>>>>>>>>>',[
                'message'=>$message
            ]);
        });
    }
}
